// fabricjs
(function () {
  let el = document.getElementById('fabricjsCanvas')
  let fabricjsCanvas = new fabric.Canvas(el);

  // 添加元素
  let rect = new fabric.Rect({
    top : 100,
    left : 100,
    width : 60,
    height : 70,
    fill : 'red'
  });

  fabricjsCanvas.add(rect);

})();

// zrender
(function () {
  let el = document.getElementById('zrender')
  let zr = zrender.init(el);

  // 添加元素
  let circle = new zrender.Circle({
    shape: {
      cx: 150,
      cy: 50,
      r: 40
    },
    style: {
      fill: 'none',
      stroke: '#F00'
    }
  });
  zr.add(circle);

})();
